package mtn.bowen.yan.server.fx;

import java.util.ResourceBundle;

/**
 * @author <a href=mailto:yanbowen90@foxmail.com> bowen.yan </a>
 * @version 1.0
 * @description: TODO
 * @date 2021-10-21 11:58 PM
 */
public enum FxmlView {
    MAIN {
        @Override
        public String title() {
            return getStringFromResourceBundle("app.title");
        }

        @Override
        public String fxml() {
            return "/template/main/main.fxml";
        }

    },
    //食谱管理
    MODULE_RECIPE_MANAGEMENT {
        @Override
        public String title() {
            return getStringFromResourceBundle("module.recipe.management.title");
        }

        @Override
        public String fxml() {
            return "/template/module/recipeManagement/recipeManagement.fxml";
        }

    },
    // 编辑种类窗口
    MODULE_EDITOR_KIND {
        @Override
        public String title() {
            return getStringFromResourceBundle("module.editor.kind.title");
        }

        @Override
        public String fxml() {
            return "/template/module/editorKind/editorKind.fxml";
        }

    },
    //菜品管理
    MODULE_MENU_MANAGEMENT{
        @Override
        public String title() {
            return getStringFromResourceBundle("module.menu.management.title");
        }

        @Override
        public String fxml() {
            return "/template/module/menuManagement/recipeMenuManagement.fxml";
        }

    },
    //本周食谱
    MODULE_WEEK_RECIPE {
        @Override
        public String title() {
            return getStringFromResourceBundle("module.week.recipe.title");
        }

        @Override
        public String fxml() {
            return "/template/module/weekRecipe/weekRecipe.fxml";
        }

    },
    //菜品排名
    MODULE_FOOD_RANKING {
        @Override
        public String title() {
            return getStringFromResourceBundle("module.food.ranking.title");
        }

        @Override
        public String fxml() {
            return "/template/module/foodRanking/foodRanking.fxml";
        }

    },
    //菜品排名pollsSuggest
    MODULE_POLLS_SUGGEST  {
        @Override
        public String title() {
            return getStringFromResourceBundle("module.polls.suggest.title");
        }

        @Override
        public String fxml() {
            return "/template/module/pollsSuggest/pollsSuggest.fxml";
        }

    };


    public abstract String title();

    public abstract String fxml();

    String getStringFromResourceBundle(String key) {
        return ResourceBundle.getBundle("Bundle").getString(key);
    }

}

